package com.dogborther.pojo;

import com.dogborther.utils.ChopstickStatus;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.net.URL;

@Data
public class Chopstick {
    //所属主人id
    private int peopleId;
    private Button button;
    private ImageView imageView;
    public void setImage(ChopstickStatus chopstickStatus){
        URL resource = Chopstick.class.getResource(chopstickStatus.getImagePath());
        Image image = new Image(resource.toExternalForm(),400,400,true,true,true);
        imageView.setImage(image);
    }

}
